package com.lagou.edu.config;

import com.lagou.edu.interceptor.SecurityInteceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * 拦截器配置类
 * @author 陶肖寅
 * @version V1.0
 * @Package com.lagou.edu.config
 * @email fromlx@126.com
 * @date 2020-03-12 00:11
 * @Copyright © 2020-2021 城云科技(中国)有限公司
 */
@Configuration
public class WebConfig extends WebMvcConfigurationSupport {
    @Autowired
    private SecurityInteceptor securityInteceptor;
    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(securityInteceptor).addPathPatterns("/resumes/**");
    }
}
